# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=checkpwd
pkgver=1.23
pkgrel=6
pkgdesc='Oracle Password Checker (Cracker).'
groups=('blackarch' 'blackarch-cracker')
url='http://www.red-database-security.com/software/checkpwd.html'
license=('GPL')
arch=('x86_64' 'aarch64')
depends=('lib32-openssl' 'unixodbc' 'zlib')
source=('http://www.red-database-security.com/software/oracle_checkpwd_linux.tar.gz'
        'checkpwd.sh' 'checkpwd_nopw.sh' 'sqlplus.sh')
noextract=('oracle_checkpwd_linux.tar.gz')
sha512sums=('6352b8565adb8bb35b726b52c2f88f5bb923ef37'
            'aa658d1c371e4cf5372421609908c3057227dfcb'
            '4bd08b5c718ca8205413000a37e55df730e02f39'
            '26aca1be6fdc2f4d4d26a7c23dbf477551cacd23')

package() {
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  tar xfz oracle_checkpwd_linux.tar.gz -C "$pkgdir/usr/share/$pkgname"
  ln -s /usr/lib32/libcrypto.so "$pkgdir/usr/share/$pkgname/libcrypto.so.0"

  install -Dm 755 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
  install -Dm 755 checkpwd_nopw.sh "$pkgdir/usr/bin/checkpwd_nopw"
  install -Dm 755 sqlplus.sh "$pkgdir/usr/bin/sqlplus"
}

